package com.dailyblue.java.project.bookstore.mapper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dailyblue.java.project.bookstore.bean.Stock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StockMapper extends BaseMapper<Stock> {

    @Update("update stock set number=number-#{number} where book_id=#{bookId}")
    void updateStock(Stock stock);
}
